//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//   PACKAGE   : dcf
//   FILE      : PublisherRequest.java
//   CLASS     : PublisherRequest
//   DATE      : 2006-04-01
//   
//   DESCRIPTION
//   The PublisherRequest class represents a message sent to the Location Service by a provider of a service to
//   be added as a publisher.
//   
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//   Copyright (c) 2006 by Hal Smith
//
//   Permission is hereby granted, free of charge, to any person obtaining a copy of this source code 
//   (the "Code")to deal with the Code without restriction, including without limitation the rights to use, copy,
//   modify, merge, publish and distribute the Code, and to permit persons to whom the Code is furnished to do 
//   so, subject to the following conditions:
//
//   The above copyright notice and this permission notice shall be included in all copies or substantial 
//   portions of the Software.
//   
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//   VERSION HISTORY
//
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package dcf;

class PublishRequest extends Message {
	
	// The name of the service being published.
	private String serviceName;
	
	
	// Contructor.
	//
	// This operation initializes the publisher request message. If the service name is null, the operation
	// throws an InitializationException. There are no other exceptions thrown by this operation.
	//
	public PublishRequest(String initServiceName) throws InitializationException {
				
		if (initServiceName != null) {
			
			serviceName = initServiceName;
			
		} else {
			
			System.out.println("PublishRequest.PublishRequest(initServiceName):");
			System.out.println("   The provided service name is null.");			
			
			throw new InitializationException();
			
		}
	
	} // constructor

	
	// This operation returns the name of the service to be published. There are no exceptions thrown 
	// by this operation.
	//
	public String getServiceName() {
		
		return serviceName;
	
	} // getServiceName()

	
} // PublishRequest

